#include "logindialog.h"
#include "ui_logindialog.h"
#include <QMessageBox>

void LoginDialog::closeEvent(QCloseEvent *event)
{
    exit(0);
}

LoginDialog::LoginDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::LoginDialog)
{
    ui->setupUi(this);

}

LoginDialog::~LoginDialog()
{
    delete ui;
}

void LoginDialog::tipWrong()
{
    QMessageBox::critical(this,"登录失败","用户名或密码输入错误");

}

void LoginDialog::on_submitBtn_clicked()
{
    QString username = ui->username->text();
    QString password = ui->password->text();
    emit sendUsername(username);
    emit sendPassword(password);
}

